<!--批量文件交易审核-->
<template>
  <div class="app-container">
    <ht-search-form
      :dictMap="dictMap"
      :queryParams="queryParams"
      :outputQueryParams="queryParams"
      :formOptions="formOptions"
      :advOptions="[]"
      :defaultEventKey="defaultEventKey"
    >
    </ht-search-form>
    <ht-table
      ref="dataTable"
      :randomRowKey="true"
      :showSerialNumber="false"
      :multi-select="false"
      :dictMap="dictMap"
      :reqConfig="reqConfig"
      :queryParams="queryParams"
      :tableBindColumns="tableBindColumns"
      :defaultEventKey="defaultEventKey"
    >
      <template v-slot:operate>
        <el-table-column label="操作" align="left" width="80" fixed="right" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <ht-button-group
              :buttonList="[
                {
                  label: '交易信息',
                  doFunc: () => {
                    toViewDetail(scope.row);
                  },
                }
              ]"
            />
          </template>
        </el-table-column>
      </template>
    </ht-table>
    <deal-search ref="dealSearch" :dictMap="dictMap"></deal-search>

  </div>
</template>
<script>
import { apiUrlQueryConfig } from "@/api/cnaps/bizMng/batchFileUpload";
import { listPageMixin } from "@/libs/listPageMixin";
import EditInfoDialog from "@/views/cnaps/bizMng/batchFile/batchFileApprove/EditInfo";
import DealSearch from "@/views/cnaps/bizMng/batchFile/batchFileQuery/DealSearch";

export default {
  name: "batchFileQuery",
  mixins: [listPageMixin],
  components: {
    DealSearch
  },
  data() {
    return {
      reqConfig: apiUrlQueryConfig,
      defaultEventKey: "defaultEventKey",
      total: 0,
      dataList: [],
      //数据字典
      searchFormDictList: [
        "Cnaps2Dict.DRCTCODE",
        "BIZ_TYPE_111",
        "BIZ_CTGY",
        "PRIORITY3CODE",
        "WORKTYPE",
        "FILE_STATUS",
        "CP2_STATUS",
        "FILECTL_STATUS",
        "FILECTL_PROC_CODE"

      ],
      // 遮罩层
      loading: true,
      // 弹出层标题
      title: "",
      showSearch: true,
      // 日期范围
      dateRange: [],
      // 查询参数
      queryParams: {
        filename:"",
        txndate:""
      },
      formOptions: [],

      tableBindColumns: [
        { label: `文件名称`, prop: "filename", width: "170" },
        { label: `文件提交日期`, prop: "txndate",type:"date", width: "170" },
        { label: `提交汇总笔数`, prop: "txntotcnt", width: "170" },
        { label: `提交汇总金额`, prop: "txntotamt",type:"price", width: "170" },
        { label: `成功笔数`, prop: "succt", width: "170" },
        { label: `失败笔数`, prop: "failcnt", width: "170" },
        { label: `审核通过笔数`, prop: "passcnt", width: "170" },
        { label: `审核拒绝笔数`, prop: "denycnt", width: "170" },
        { label: `处理类型`, prop: "worktype",dictCode:"WORKTYPE", width: "170" },
        { label: `预约处理日期`, prop: "workdate",type:"date",  width: "170" },
        { label: `处理状态`, prop: "status",dictCode:"FILECTL_STATUS",fixed: "right"},
        { label: `处理结果`, prop: "procCode",dictCode:"FILECTL_PROC_CODE",fixed: "right"},

      ],
    };
  },
  computed: {

  },
  created() {
  },
  mounted() {
    this.formOptions = [
      {
        type: "input",
        prop: "filename",
        defaultAttr: {
          label: "文件名称",
          placeholder: "请输入文件名称",
        },
      },
      {
        type: "singleDate",
        prop: "txndate",
        defaultAttr: {
          label: "文件提交日期",
          placeholder: "请输入文件提交日期",
        },
      }
    ];
  },
  methods: {
    editComplete(state) {
      console.log("editComplete", state);
      if (state == true) {
        this.getList();
      }
    },

    /** todo 查询当天操作员的交易记录 */
    getList() {
      this.doQuery();
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /*审核明细*/
    toViewDetail(row) {
      this.$refs.dealSearch.show(row.id);
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}
</style>
